#!/usr/bin/env python2
# coding:utf-8

import sys
import random

sys.path.append('./scripts')
sys.path.append('./scripts/lib')

from base import config
from utils.suger import *
from screen.screengame import ScreenGame

def main():
    random.seed()

    theWorld.Init('%s %s' % (config.TITLE, config.VER), config.SCREEN_WIDTH, config.SCREEN_HEIGHT)
    theWorld.LoadFont('data/wqy-microhei.ttf', 'wqy', 32)
    theWorld.LoadFont('data/wqy-microhei.ttf', 'wqyMedium', 20)
    theWorld.LoadFont('data/wqy-microhei.ttf', 'wqySmall', 11)

    theWorld.InitGUI('data/pics/DefaultSkin.png', 'data/wqy-microhei.ttf')
    gui = theWorld.GetGUI()
    canvas = gui.GetCanvas()

    scr = ScreenGame()
    theWorld.PushScreen(scr)
    
    theWorld.StartGame()
    theWorld.EndGame()

if __name__ == "__main__":
    main()
